const {MongoClient} = require('mongodb')

const client = new MongoClient('mongodb://127.0.0.1:27017')

const main = async ()=>{
    await client.connect();
    const db = client.db('mytest');
    const cc = db.collection('cc');
    const data = await cc.find();
    console.log('data',await data.toArray())
}

main().finally(()=>client.close())